package diona;

import javax.swing.*;
import java.awt.*;

/**
 * User: anton
 * Date: 27.02.11 22:51
 */
public class Notifier {

    private final TrayIcon icon;

    public Notifier(TrayIcon icon) {
        this.icon = icon;
    }

    public void showMessage(final String message) {
        if (icon != null) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    icon.displayMessage("HotKeyListener", message, TrayIcon.MessageType.INFO);
                }
            });
        }
    }
}
